<h1 style="background-color:#333333; color: #ffffff;">Shrek</h1>
<pre style="font-family:Monaco, monospace; padding:2em; background-color: #222222; color: #ffffff;">
&lt;?php

<span style="color: #B2DE62;">namespace</span> Illuminate\Container;

<span style="color: #B2DE62;">use</span> Closure;
<span style="color: #B2DE62;">use</span> ArrayAccess;

<span style="color: #555555;">/**
 * Theme: Shrek
 * Shrek.
 *
 * Copyright (c) 2014 Dayle Rees
 */</span>
<span style="color: #B2DE62;">class</span> Container <span style="color: #857a5e;">implements</span> ArrayAccess
{
    <span style="color: #555555;">/**
     * An array of the types that have been resolved.
     *
     * <span style="color: #777777;">@var</span> array
     */</span>
    <span style="color: #857a5e;">protected</span> <span style="color: #ffffff;">$resolved</span> <span style="color: #B2DE62;">=</span> <span style="color: #B2DE62;">array</span>();

    <span style="color: #555555;">/**
     * Determine if a given type is shared.
     *
     * <span style="color: #777777;">@param</span>  string  $abstract
     * <span style="color: #777777;">@return</span> bool
     */</span>
    <span style="color: #857a5e;">public</span> <span style="color: #B2DE62;">function</span> <span style="color: #F0F2EB;">isShared</span>(<span style="color: #ffffff;">$abstract</span>)
    {
        <span style="color: #bfb59b;">if</span> (<span style="color: #B2DE62;">isset</span>(<span style="color: #ffffff;">$this</span><span style="color: #bfb59b;">-></span><span style="color: #ffffff;">bindings</span>[<span style="color: #ffffff;">$abstract</span>][<span style="color: #81e911;">'shared'</span>]))
        {
            <span style="color: #ffffff;">$shared</span> <span style="color: #bfb59b;">=</span> <span style="color: #ffffff;">$this</span><span style="color: #bfb59b;">-></span><span style="color: #ffffff;">bindings</span>[<span style="color: #ffffff;">$abstract</span>][<span style="color: #81e911;">'shared'</span>];
        }
        <span style="color: #bfb59b;">else</span>
        {
            <span style="color: #ffffff;">$shared</span> <span style="color: #bfb59b;">=</span> <span style="color: #857a5e;">false</span>;
        }

        <span style="color: #bfb59b;">return</span> <span style="color: #B2DE62;">isset</span>(<span style="color: #ffffff;">$this</span><span style="color: #bfb59b;">-></span><span style="color: #ffffff;">instances</span>[<span style="color: #ffffff;">$abstract</span>]) <span style="color: #bfb59b;">||</span> <span style="color: #ffffff;">$shared</span> <span style="color: #bfb59b;">===</span> <span style="color: #857a5e;">true</span>;
    }

}
</pre>
